<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Welcome</title>
    <link rel="stylesheet" href="../static/style.css">
</head>
<body>
    <h1>学生信息管理系统</h1>
    <a href="/addone" class="add">添加学生</a>
    <div class="container">
        <table>
            <thead>
                <td>编号</td>
                <td>姓名</td>
                <td>年龄</td>
                <td>其他(体重)</td>
                <td>操作</td>
            </thead>
            {{each list}}
            <tr>
                <td>{{$value._id}}</td>
                <td>{{$value.name}}</td>
                <td>{{$value.age}}</td>
                <td>{{$value.othters.weight}}</td>
                <!-- {{$value}}的$之前加上@能够去掉id的引号 -->
                <td><a href="/edit?id={{@$value._id}}">编辑</a>  <a href="/delete?id={{@$value._id}}">删除</a></td>
            </tr>
            {{/each}}
        </table>
    </div>
</body>
</html>